import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { EnumProfitRefundType, profitRefundStatusEnum } from './profitRefund.enum';
import { EnumProfitRefundReasonType, profitTypeEnum } from '../profit/profit.enum';

@Entity()
export class ProfitRefund {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ name: 'answer_id' })
  answer_id: number;

  @Column({ name: 'author_wx_user' })
  author_wx_user: string;

  @Column({ name: 'use_wx_user' })
  use_wx_user: string;

  @Column({ name: 'unit_price' })
  unit_price: number;

  @Column({ name: 'service_charge' })
  service_charge: number;

  @Column({ name: 'type' })
  type: profitTypeEnum;

  @Column({ name: 'delivery_time' })
  delivery_time: Date;

  @Column({ name: 'notes' })
  notes: string;

  @Column({ name: 'status' })
  status: profitRefundStatusEnum;

  @Column({ name: 'refund_type' })
  refund_type: EnumProfitRefundType;

  @Column({ name: 'reason' })
  reason: EnumProfitRefundReasonType;

  @Column({ name: 'create_time' })
  create_time: Date;

  @Column({ name: 'update_time' })
  update_time: Date;
}
